package com.jy.project.controller;


import com.jy.project.service.MaterialAttrFieldService;
import com.jy.project.util.ServiceResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/v1")
@CrossOrigin
public class MaterialAttrFieldController {

    @Autowired
    private MaterialAttrFieldService materialAttrFieldService;

    /**
     * 根据主键删除
     */
    @RequestMapping("/materialAttrField/delete")
    @ResponseBody
    public Object delete(Long id) {
        materialAttrFieldService.deleteById(id);
        return ServiceResultUtils.success(null);
    }
}
